package cn.com.scitc.licenseplateback.model;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Objects;

@Entity
@Table(name = "MembershipInformation", schema = "CubeLibrary", catalog = "")
public class MembershipInformationEntity {
    private int autoNumber;
    private String name;
    private String licensePlateNumber;
    private String cellPhoneNumber;
    private String registerTime;
    private String member;
    private int grade;
    private BigDecimal balance;
    private String password;
    private String stal;
    private String idNumber;

    @Id
    @Column(name = "AutoNumber")
    public int getAutoNumber() {
        return autoNumber;
    }

    public void setAutoNumber(int autoNumber) {
        this.autoNumber = autoNumber;
    }

    @Basic
    @Column(name = "Name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "LicensePlateNumber")
    public String getLicensePlateNumber() {
        return licensePlateNumber;
    }

    public void setLicensePlateNumber(String licensePlateNumber) {
        this.licensePlateNumber = licensePlateNumber;
    }

    @Basic
    @Column(name = "CellPhoneNumber")
    public String getCellPhoneNumber() {
        return cellPhoneNumber;
    }

    public void setCellPhoneNumber(String cellPhoneNumber) {
        this.cellPhoneNumber = cellPhoneNumber;
    }

    @Basic
    @Column(name = "RegisterTime")
    public String getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(String registerTime) {
        this.registerTime = registerTime;
    }

    @Basic
    @Column(name = "Member")
    public String getMember() {
        return member;
    }

    public void setMember(String member) {
        this.member = member;
    }

    @Basic
    @Column(name = "Grade")
    public int getGrade() {
        return grade;
    }

    public void setGrade(int grade) {
        this.grade = grade;
    }

    @Basic
    @Column(name = "Balance")
    public BigDecimal getBalance() {
        return balance;
    }

    public void setBalance(BigDecimal balance) {
        this.balance = balance;
    }

    @Basic
    @Column(name = "Password")
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Basic
    @Column(name = "Stal")
    public String getStal() {
        return stal;
    }

    public void setStal(String stal) {
        this.stal = stal;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MembershipInformationEntity that = (MembershipInformationEntity) o;
        return autoNumber == that.autoNumber &&
                grade == that.grade &&
                Objects.equals(name, that.name) &&
                Objects.equals(licensePlateNumber, that.licensePlateNumber) &&
                Objects.equals(cellPhoneNumber, that.cellPhoneNumber) &&
                Objects.equals(registerTime, that.registerTime) &&
                Objects.equals(member, that.member) &&
                Objects.equals(balance, that.balance) &&
                Objects.equals(password, that.password) &&
                Objects.equals(stal, that.stal);
    }

    @Override
    public int hashCode() {
        return Objects.hash(autoNumber, name, licensePlateNumber, cellPhoneNumber, registerTime, member, grade, balance, password, stal);
    }

    @Basic
    @Column(name = "IDNumber")
    public String getIdNumber() {
        return idNumber;
    }

    public void setIdNumber(String idNumber) {
        this.idNumber = idNumber;
    }

    @Override
    public String toString() {
        return "MembershipInformationEntity{" +
                "autoNumber=" + autoNumber +
                ", name='" + name + '\'' +
                ", licensePlateNumber='" + licensePlateNumber + '\'' +
                ", cellPhoneNumber='" + cellPhoneNumber + '\'' +
                ", registerTime=" + registerTime +
                ", member='" + member + '\'' +
                ", grade=" + grade +
                ", balance=" + balance +
                ", password='" + password + '\'' +
                ", stal='" + stal + '\'' +
                ", idNumber='" + idNumber + '\'' +
                '}';
    }
}
